<?php
/**
 * Created by PhpStorm.
 * User: lidan
 * Date: 2018/10/15
 * Time: 下午1:01
 */

namespace Imooc;


class Proxy implements IUserProxy
{
    function getUserName($id)
    {
        $db = Factory::getDatabase('slave');
        $db->query("select ...");
    }

    function setUserName($id, $name)
    {
        $db = Factory::getDatabase('master');
        $db->query("update ...");
    }
}